package com.pigeon.utils;

import java.io.*;

/**
 * 读取文件帮助类
 */
public class LmFileHelper {
    public static void readContent(String fileName)throws IOException{

        InputStream is = null;
        BufferedReader reader = null;

        try {

            is = LmFileHelper.class.getClassLoader()
                    .getResourceAsStream("Test.txt");

            reader = new BufferedReader(new InputStreamReader(is));
            String line;

            while((line=reader.readLine())!=null) {
                System.out.println(line);
            }

        }
        finally {
            if(reader!=null){
                reader.close();
            }
            if(is!=null){
                is.close();
            }
        }
    }
}
